﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<style type="text/css">
    .row {
        margin-bottom: 0.5em;
    }

    #mymodel1 .modal-body {
        min-height: 300px;
    }
</style>
<div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-8">
        <div class="input-group">
            <input type="text" name="q" class="form-control" placeholder="搜索..." />
            <span class="input-group-btn">
                <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
            </span>
        </div>

    </div>
    <div class="col-md-2"></div>
</div>
<div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-8">
        <table class="table table-striped table-hover text-center" id="shuju">
            <thead>
                <tr>
                    <th style="width:40%">申请标题</th>
                    <th style="width:20%">申请时间</th>
                    <th style="width:20%">审核状态</th>
                    <th style="width:20%">审核人</th>
                </tr>
            </thead>
            <tbody>
                @if (ViewBag.PeblishList != null)
            {
                foreach (MinHangWisdomParkWeb.Controllers.ShenQin a in ViewBag.PeblishList as List<MinHangWisdomParkWeb.Controllers.ShenQin>)
                {
                        <tr>
                            <td><button type="button" class="btn btn-link title" tag="@a.PeblishID" data-toggle="modal" data-target="#mymodel1">@a.Title</button></td>
                            <td>@a.Time</td>
                            <td>@a.StateName</td>
                            <td>@a.ConfirmerName</td>
                        </tr>
                    }
                }
            </tbody>
        </table>
    </div>
    <div class="col-md-2"></div>
</div>
<div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-8  text-right">
        <nav>
            <ul class="pagination">
                <li>
                    <a href="#" aria-label="Previous" class="qian">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>

                @{
                    if (ViewBag.Count != null)
                    {
                        for (var i = 1; i <= ViewBag.Count; i++)
                        {
                            if (i > 5)
                            {
                                return;
                            }
                            else
                            {
                                if (i == 1)
                                {
                                    <li class="active li"><a href="#">@i</a></li>
                                }
                                else
                                {
                                    <li class="li"><a href="#">@i</a></li>
                                }
                            }
                        }
                    }
                }

                <li>
                    <a href="#" aria-label="Next" class="hou">
                        <span aria-hidden="true">&raquo;</span>
                    </a>
                </li>
            </ul>
        </nav>
    </div>
    <div class="col-md-2"></div>
</div>
<div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-8 text-right">
        <button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal">+ 提交申请</button>
    </div>
    <div class="col-md-2"></div>
</div>

<!-- Modal -->
<div class="modal fade" id="mymodel1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel"></h4>
            </div>
            <div class="modal-body">

            </div>
        </div>
    </div>
</div>

@*新添加申请*@
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">@ViewBag.Type 申请</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="input-group">
                            <div class="input-group-addon">发布标题:</div>
                            <input type="text" class="form-control" id="PeblishTitle">
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="input-group">
                            <div class="input-group-addon">发布内容:</div>
                            <textarea class="form-control" id="PublishContent" rows="6"></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="row" id="imgzhanshi"></div>
                    </div>
                </div>

                <div style="display:none;">
                    <form action="/InformationDelivery/UpLoadPhoto" method="POST" enctype="multipart/form-data" name="ImgForm" id="ImgForm">
                        <input type="file" name="file" id="imgFlie" required="required" />
                        <input type="submit" name="subt" value="上传图片" />
                    </form>
                </div>



            </div>
            <div class="modal-footer">
                <button class="btn btn-info" type="button" id="imgUpload">上传图片</button>
                <button type="button" id="btnzong" class="btn btn-info">确认提交</button>
            </div>
        </div>
    </div>
</div>

<input type="hidden" id="count" value="@ViewBag.Count" />
<input type="hidden" id="countid" value="@ViewBag.CodeID" />
<script src="~/Scripts/funs.js"></script>
<script src="~/ViewScripts/InformationDelivery-index.js"></script>